<template>
  <el-container>
    <el-header>
      <div>猫眼电影后台管理系统</div>
      <div>欢迎你, xxx <el-button size="mini" @click="handleClick">登出</el-button></div>
    </el-header>
    <el-container>
      <el-aside width="200px">
        <NavMenu></NavMenu>
      </el-aside>
      <el-container>
        <el-main>
          <router-view></router-view>
        </el-main>
        <el-footer>Footer</el-footer>
      </el-container>
    </el-container>
  </el-container>
</template>

<script>
import NavMenu from '@c/NavMenu'
export default {
  components: {
    NavMenu
  },

  methods: {
    async handleClick() {
      localStorage.removeItem('x-access-token')
      this.$router.push('/signin')
    }
  },
}
</script>

<style lang="stylus" scoped>
.el-container {
  height 100%
}

.el-header, .el-footer {
  background-color: #de5042;
  color: #fff;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #fff;
  color: #333;
}

.el-main {
  background-color: #E9EEF3;
  color: #333;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
}

.el-container:nth-child(7) .el-aside {
}

.el-header
  display flex
  justify-content space-between
</style>